<!--  活动模版-->
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <search ref="search"  :config="searchConfig" @search="search" @getHeight="getHeight"/>

    <!-- table区域-begin -->
    <div class='page_table'>
      <vxe-grid
        ref='xGrid'
        v-bind='vexConfig'
        :align='left'
        :border='true'
        :checkbox-config='checkboxConfig'
        :columns='columns'
        :data='dataSource'
        :height='pageHeight-seachHeight-94'
        :loading='loading'
        :resizable='true'
        :showOverflow='true'
        :toolbar-config='tableToolbar'
        size='mini'
        @checkbox-change='selectChangeEvent'
        @checkbox-all='selectChangeEvent'
      >
        <template #toolbar_buttons>
          <!-- 操作按钮区域 -->
          <div class='table-operator'>

          </div>
        </template>
        <template #pager>
          <vxe-pager
            :currentPage.sync='ipagination.current'
            :layouts="['Total', 'PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump','Sizes', 'FullJump']"
            :page-size.sync='ipagination.pageSize'
            :pageSizes='ipagination.pageSizeOptions'
            :total='ipagination.total'
            @page-change='handlePageChange'>
          </vxe-pager>
        </template>
      </vxe-grid>
    </div>
    <!-- table区域-end -->

  </a-card>
</template>

<script>
import { PageListMixin } from '@/mixins/PageListMixin'
let month=[
  {
    name:'01',
    value:'01'
  },{
    name:'02',
    value:'02'
  },{
    name:'03',
    value:'03'
  },{
    name:'04',
    value:'04'
  },{
    name:'05',
    value:'05'
  },{
    name:'06',
    value:'06'
  },{
    name:'07',
    value:'07'
  },{
    name:'08',
    value:'08'
  },{
    name:'09',
    value:'09'
  },{
    name:'10',
    value:'10'
  },{
    name:'11',
    value:'11'
  },{
    name:'12',
    value:'12'
  }]

export default {
  name: 'custCostBudgetFeeTemplate',
  mixins:[PageListMixin],
  components: {
  },
  data () {
    return {
      description: '客户费用明细列表',
      searchConfig:[
        {
          type:'input',
          name:'custCode',
          placeholder:'经销商编码',
        },
        {
          type:'input',
          name:'custName',
          placeholder:'经销商名称',
        },
        {
          type: 'tree-select',
          name: 'orgCode',
          dataType:'org',
          placeholder: '组织'
        },
        {
          type: 'tree-select',
          name: 'productLevelCode',
          name1: 'productLevelName',
          dataType:'product_type',
          placeholder: '商品分类',
        },
        {
          type: 'j-select',
          dictCode:'budget_year',
          name:'budgetYear',
          placeholder:'年度',
        },
        {
          type:'a-select',
          name:'budgetMonth',
          option: month,
          placeholder:'月份'
        }
       ],
      // 表头
      columns: [
        { type: 'checkbox', width: 50, fixed: null ,field: 'a',},
        {
          title: '客户编码',
          minWidth: 80,
          field: 'custCode',
        },
        {
          title: '客户名称',
          minWidth: 80,
          field: 'custName',
        },
        {
          title: '组织编码',
          minWidth: 80,
          field: 'orgCode',
        },
        {
          title: '组织名称',
          minWidth: 80,
          field: 'orgName',
        },
        {
          title: '产品层级名称',
          minWidth: 120,
          field: 'productLevelName',
        },
        {
          title: '预算年份',
          field: 'budgetYear',
          minWidth: 80,
          // slots: { default: 'budgetYear' }
        },
        {
          title: '预算月度',
          minWidth: 80,
          field: 'budgetMonth',
        },
        {
          title: '预算返还',
          minWidth: 80,
          field: 'ysfh',
        },
        {
          title: '随车剩余',
          minWidth: 80,
          field: 'scsy',
        },
        {
          title: '销售金额',
          minWidth: 80,
          field: 'orderAmount',
        },
        {
          title: '陈列费',
          minWidth: 80,
          field: 'cl',
        },
        {
          title: '人员费',
          minWidth: 80,
          field: 'ry',
        },
        {
          title: '场地费',
          minWidth: 80,
          field: 'cd',
        },
        {
          title: '试吃费',
          minWidth: 80,
          field: 'sc',
        },
        {
          title: '赠品自采购费',
          minWidth: 120,
          field: 'zc',
        },
        {
          title: '广宣制作费',
          minWidth: 100,
          field: 'gxzz',
        },
        {
          title: '广宣物料领用',
          minWidth: 120,
          field: 'gxly',
        },
        {
          title: '店内促销费',
          minWidth: 100,
          field: 'dncx',
        },
        {
          title: '条码/进店费',
          minWidth: 100,
          field: 'tmjd',
        },
        {
          title: '形象制作费',
          minWidth: 100,
          field: 'xxzz',
        },
        {
          title: 'PK赛',
          minWidth: 80,
          field: 'pk',
        },
        {
          title: 'DM刊费',
          minWidth: 80,
          field: 'dmk',
        }
      ],
      url: {
        // 列表接口
        list: window._CONFIG['domianTpmURL']+ "/budget/tpmBudgetFee/findCustCostBudgetFeeList",
        // 导出接口
        // exportXlsUrl: window._CONFIG['domianTpmURL']+"budget/tpmBudgetFee/exportXls",
      },
    }
  },
  created() {

  },
  watch:{

  },
  computed: {

  },
  methods: {
  }
}
</script>

<style lang="less" scoped>
@import '~@assets/less/common.less';
/deep/ .ant-pagination{
  float:right;
}
</style>